﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for EThamSo
/// </summary>
public class EThamSo
{
	public EThamSo()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    private string maThamSo;
    private string soLan;
    private DateTime ngayBatDau;
    private DateTime ngayKetThuc;
    private string giaTri;
    private string yNghia;

    public EThamSo(string maThamSo, string soLan, string giaTri, string yNghia, DateTime ngayBatDau,DateTime ngayKetThuc)
    {
        this.maThamSo = maThamSo;
        this.soLan = soLan;
        this.giaTri = giaTri;
        this.ngayBatDau = ngayBatDau;
        this.ngayKetThuc = ngayKetThuc;
        this.yNghia = yNghia;
    }
    public string MaThamSo
    {
        get { return this.maThamSo; }
        set
        {
            this.maThamSo = value;
        }
    }
    public string SoLan
    {
        get { return this.soLan; }
        set
        {
            if (value == null)
                throw new Exception("tenThamSo not allow nullvalue.");
            this.soLan= value;
        }
    }
    public string GiaTri
    {
        get { return this.giaTri; }
        set { this.giaTri = value; }
    }
    public DateTime NgayBatDau
    {
        get { return this.ngayBatDau; }
        set
        {
            if (value == null)
                throw new Exception("ngayNhap not allow nullvalue.");
            this.ngayBatDau = value;
        }
    }
    public DateTime NgayKetThuc
    {
        get { return this.ngayKetThuc; }
        set
        {
            if (value == null)
                throw new Exception("ngayNhap not allow nullvalue.");
            this.ngayKetThuc = value;
        }
    }
    public string YNghia
    {
        get { return this.yNghia; }
        set { this.yNghia = value; }
    }
    public override string ToString()
    {
        return this.maThamSo + "; " + this.soLan + "; " + this.giaTri + "; " + this.yNghia + "; "+this.ngayBatDau+";"+this.ngayKetThuc+";";
    }
    public override bool Equals(Object obj)
    {
        EThamSo me = (EThamSo)obj;
        bool ret = this.MaThamSo.Equals(me.MaThamSo);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaThamSo.GetHashCode();
    }
}